<?php

declare(strict_types=1);
/**
 * This file is part of Hyperf.
 *
 * @link     https://www.hyperf.io
 * @document https://hyperf.wiki
 * @contact  group@hyperf.io
 * @license  https://github.com/hyperf/hyperf/blob/master/LICENSE
 */

namespace App\Controller;

use HKY\HyperfResponse\HttpServer\Contract\HKYResponseInterface;
use Hyperf\Di\Annotation\Inject;
use Hyperf\HttpServer\Contract\RequestInterface;
use Psr\Container\ContainerInterface;

abstract class AbstractController
{
    /**
     * @Inject
     * @var ContainerInterface
     */
    protected $container;

    /**
     * @Inject
     * @var RequestInterface
     */
    protected $request;

    /**
     * @Inject
     * @var HKYResponseInterface
     */
    protected $response;

    /**
     * 获取登陆用户信息
     * @return array
     */
    public function getLoginUserInfo(): array
    {
        // 各系统按需实现

        return [
            'uid' => 1226,
        ];
    }
}
